/**
 * BudgetBuoy
 * 
 * Simplify your personal expense management
 * 
 * @team cs2103jan13-w15-3j
 */

//--------------------------------------------------------------

/**
 * CatSpendComparator Class
 * 
 * Description: A Comparator class used in sorting when tracking expenses
 * 
 * 
 * @package shared
 * @author  Li Yin (A0085686L)
 * @editor(s) -
 */


package shared;

import java.util.Comparator;

public class CatSpendComparator implements Comparator<CatSpend>{
	public int compare(CatSpend ex1, CatSpend ex2){
		//compares for order by total spending in given categories
		return ex1.getExpense()-ex2.getExpense();
	}

	public boolean equals(Object obj){
		//check if have same object
		return this==obj;
	}
}
